﻿using System;
using System.Collections.Generic;
using Castle.DynamicProxy;
using Castle.MicroKernel;
using Castle.Model;
using Castle.Windsor;
using EasyExam.DataServer;

namespace EasyExam.Model
{
    public class ModelFactory
    {
        public IRepository<TEntity> GetModel<TEntity>()
        {
            Castle.Windsor.IWindsorContainer container = new Castle.Windsor.WindsorContainer("CastleObjMap.xml");
            IRepository<TEntity> mr = (IRepository<TEntity>)container[typeof(IRepository<TEntity>)];
            return mr;
        }
    }
}
